﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControl_tin_tuc : System.Web.UI.UserControl
{
    string strClassName = "UserControl_tin_tuc";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            xCheckFunction();
        }
    }

    /// <summary>
    /// Check param to load user control
    /// Author: NguyenTV
    /// Create Date: 05/09/2013
    /// </summary>
    private void xCheckFunction()
    {
        try
        {
            string strUserControl = clsCommon.fncGetRoute(this.Page, "userControl");
            string strParam1 = clsCommon.fncGetRoute(this.Page, "param1");
            string strParam2 = clsCommon.fncGetRoute(this.Page, "param2");
            string strUserControlName = "tin-tuc-danh-sach-chuyen-muc";
            if (string.IsNullOrEmpty(strParam1) == false
                && string.IsNullOrEmpty(strParam2) == true)
            {
                strUserControlName = "tin-tuc-chi-tiet";
            }
            clsCommon.fncLoadUserControl(plhContent, this.Page, "UserControl/", strUserControlName, "index");
        }
        catch (Exception ex)
        {
            OsPortal.oFileHelper.WriteLogErr(strClassName, "fncExportKieuPhongTroControl", ex.ToString());
        }
    }
}